{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 多项式回归"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 准备数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "x = np.random.uniform(-3, 3, size=100)\n",
    "y = 0.5 * x ** 2 + x + 2 + np.random.normal(0, 1, size=100)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD8CAYAAABn919SAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAGb5JREFUeJzt3X2MXFd5x/Hf480ExuFlU2Xb4k1cp1LklCQFtyuE6haRhOKUhMRNeS1UCFpZ/EFJouDiFKlOaFFcueVFVVU1StJSkYIDSbehoXUoDqJEDWWdtRuM4yoC8jJJiSlZIHgha/vpH96xd2fnzsy999z370eKsjM7O3PueOa55z7nOeeYuwsAUH2rim4AACAMAjoA1AQBHQBqgoAOADVBQAeAmiCgA0BNENABoCYI6ABQEwR0AKiJ0/J8sbPOOsvXrVuX50sCQOXt3bv3e+4+MexxuQb0devWaWZmJs+XBIDKM7PHRnkcKRcAqAkCOgDUBAEdAGqCgA4ANUFAB4CayLXKBQDqYHq2o527D+mpuXmtGW9r66b12rxhsuhmEdABII7p2Y5uuPthzS8ckyR15uZ1w90PS1LhQZ2UCwDEsHP3oZPBvGt+4Zh27j5UUItOIaADQAxPzc3Huj9PBHQAiGHNeDvW/XkioANADFs3rVe7NbbsvnZrTF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lV1b2U94bvFma/G/IPGsMgFdkszsI2b2hKR3SPqTotsTyHsk/WvRjYAmJT2x5PaTqnDQqCszWydpg6SvFduSdMxszMz2SXpG0hfdPcjxlCqgm9m/m9k3+vx3lSS5+4fc/RxJd0h6X7GtHWzYsSw+5kOSjurE8ZTaKMdTcdbnvspeBdaRmb1I0l2Sru25Yq8cdz/m7q/UiavzV5lZkLRYqXYscvfXjfjQf5R0r6TtGTYnlWHHYmbvknSFpEu9AgMZMf5tqupJSecsuX22pKcKagt6LOaa75J0h7vfXXR7QnH3OTP7sqTLJKUewC5VD30QMztvyc0rJT1SVFvSMrPLJH1Q0pXufqTo9kDSiUHQ88zsXDM7XdLbJN1TcJugk4OIt0k66O4fLbo9aZnZRLeyzczakl6nQPGsSlUud0larxPVFI9Jeq+7d4ptVTJm9qikF0j6v8W7HqxqxY4kmdlvS/orSROS5iTtc/dNxbYqPjN7g6SPSxqTdLu7f6TgJiVmZp+W9FqdWNHvu5K2u/tthTYqITP7dUn/Ielhnfj+S9Ifu/sXimtVcmb2y5I+qROfs1WS7nT3Dwd57qoEdADAYJVJuQAABiOgA0BNENABoCYI6ABQEwR0AKgJAjoA1AQBHQBqgoAOADXx/yzdNQVcLyGoAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.scatter(x, y)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 将样本数据转成一个矩阵\n",
    "X = x.reshape(-1, 1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 线性回归拟合数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "LinearRegression(copy_X=True, fit_intercept=True, n_jobs=None,\n",
       "         normalize=False)"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from sklearn.linear_model import LinearRegression\n",
    "\n",
    "lin_reg = LinearRegression()\n",
    "lin_reg.fit(X, y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "y_predict = lin_reg.predict(X)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD8CAYAAABn919SAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAHqhJREFUeJzt3XuQXHWVB/DvmUkDPSA2mHFNBrKTtaigIcDoFFI7LMV7KAlhjKK4PnG3UpQgkMIxyUptYHfdDGZFLLG2TCm7rg8MEBghIMEliEBB1gkzMS+CrASSTpSwZlCShkwyZ//o6Zmenntv38fvPvv7qbLMdHdu/26YPn3u+Z3f74qqgoiI0q8p7gEQEZEZDOhERBnBgE5ElBEM6EREGcGATkSUEQzoREQZwYBORJQRDOhERBnBgE5ElBHTonyz6dOna3t7e5RvSUSUehs3bnxdVVvrvS7SgN7e3o6BgYEo35KIKPVE5BU3r2PJhYgoIxjQiYgyggGdiCgjGNCJiDKCAZ2IKCMi7XIhIsqC/sEiVq7bgT3DJcws5NHbPQc9HW1xD4sBnYjIi/7BIpbdvxmlkSMAgOJwCcvu3wwAsQd1llyIiDxYuW7HeDCvKI0cwcp1O2Ia0QQGdCIiD/YMlzw9HiUGdCIiD2YW8p4ejxIDOhGRB73dc5DPNU96LJ9rRm/3nJhGNIGTokREHlQmPtnlQkSUAT0dbYkI4LVYciEiyoi6GbqI3AVgPoDXVPW0scdOBLAaQDuAnQA+rqr7wxsmEVF6x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BAM6EVFG/D8itOVV0Ko0KQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.scatter(x, y)\n",
    "plt.plot(x, y_predict, color='r')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 多项式回归拟合数据"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "为了使得拟合效果更好，多项式回归就是在线性回归的基础上添加一个特征"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(100, 1)"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(X ** 2).shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "X2 = np.hstack([X, X ** 2])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(100, 2)"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X2.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "lin_reg2 = LinearRegression()\n",
    "lin_reg2.fit(X2, y)\n",
    "y_predict2 = lin_reg2.predict(X2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD8CAYAAABn919SAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQur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ABGWGuLotuq4Bhj1gJNgB8rv/VpvM7YATDGnA88DmQCxcAya23f6LYqcMaYc4G/A6nAM9baB6PcpKAZY14CTsep6PcDMN5aOzWqjQqSMeb3wP8BK3De/wB/sda+Hb1WBc8YczTwLM7fWQoww1p7nyvPHS8BXUREGhY3KRcREWmYArqISIJQQBcRSRAK6CIiCUIBXUQkQSigi4gkCAV0EZEEoYAuIpIg/h+uj5IL1ImwHwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.scatter(x, y)\n",
    "plt.plot(np.sort(x), y_predict2[np.argsort(x)], color='r')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([0.9364391 , 0.61748348])"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "lin_reg2.coef_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1.6259304480540924"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "lin_reg2.intercept_"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## scikit-learn中的多项式回归和pipeline"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 处理1个特征"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.preprocessing import PolynomialFeatures"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(100, 3)"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 设置最多添加到几次幂\n",
    "poly = PolynomialFeatures(degree=2)\n",
    "poly.fit(X)\n",
    "X3 = poly.transform(X)\n",
    "X3.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[ 1.        ,  1.94130691,  3.76867251],\n",
       "       [ 1.        ,  1.66860836,  2.78425386],\n",
       "       [ 1.        , -1.25053539,  1.56383877],\n",
       "       [ 1.        ,  0.35855717,  0.12856324],\n",
       "       [ 1.        , -2.19524264,  4.81909023]])"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X3[:5, :]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[ 1.94130691],\n",
       "       [ 1.66860836],\n",
       "       [-1.25053539],\n",
       "       [ 0.35855717],\n",
       "       [-2.19524264]])"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X[:5, :]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "scikit-learn中的PolynomialFeatures为原来的样本添加了0次幂和2次幂对应的特征"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [],
   "source": [
    "lin_reg3 = LinearRegression()\n",
    "lin_reg3.fit(X3, y)\n",
    "y_predict3 = lin_reg3.predict(X3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD8CAYAAABn919SAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAIABJREFUeJzt3Xl4VEW6x/FvJ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M7YATDGnA88DmQCxcAya23f6LYqcMaYc4G/A6nAM9baB6PcpKAZY14CTsep6PcDMN5aOzWqjQqSMeb3wP8BK3De/wB/sda+Hb1WBc8YczTwLM7fWQoww1p7nyvPHS8BXUREGhY3KRcREWmYArqISIJQQBcRSRAK6CIiCUIBXUQkQSigi4gkCAV0EZEEoYAuIpIg/h+uj5IL1ImwHwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.scatter(x, y)\n",
    "plt.plot(np.sort(x), y_predict3[np.argsort(x)], color='r')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([0.        , 0.9364391 , 0.61748348])"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "lin_reg3.coef_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1.6259304480540944"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "lin_reg3.intercept_"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 处理2个特征"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [],
   "source": [
    "X4 = np.arange(1, 11).reshape(-1, 2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(5, 2)"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X4.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[ 1,  2],\n",
       "       [ 3,  4],\n",
       "       [ 5,  6],\n",
       "       [ 7,  8],\n",
       "       [ 9, 10]])"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X4"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [],
   "source": [
    "poly = PolynomialFeatures(degree=2)\n",
    "poly.fit(X4)\n",
    "X5 = poly.transform(X4)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(5, 6)"
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X5.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[  1.,   1.,   2.,   1.,   2.,   4.],\n",
       "       [  1.,   3.,   4.,   9.,  12.,  16.],\n",
       "       [  1.,   5.,   6.,  25.,  30.,  36.],\n",
       "       [  1.,   7.,   8.,  49.,  56.,  64.],\n",
       "       [  1.,   9.,  10.,  81.,  90., 100.]])"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X5"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "scikit-learn中的PolynomialFeatures为原来的样本多加了4列，扩充特征后每一列代表：\n",
    "1. 第1列：原来样本中0次幂的结果\n",
    "2. 第2,3列：原来样本中的两列对应的1次幂的结果\n",
    "3. 第4列：原来样本中的第1列的2次幂对应的结果\n",
    "4. 第5列：原来样本中的第1列和第2列相乘的结果\n",
    "5. 第6列：原来样本中的第2列的2次幂对应的结果"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 使用Pipeline简化多项式回归的步骤"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.pipeline import Pipeline\n",
    "from sklearn.preprocessing import StandardScaler"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [],
   "source": [
    "poly_reg = Pipeline([\n",
    "    (\"poly\", PolynomialFeatures(degree=2)), \n",
    "    (\"std_scaler\", StandardScaler()), \n",
    "    (\"lin_reg\", LinearRegression())\n",
    "])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [],
   "source": [
    "poly_reg.fit(X, y)\n",
    "y_predict4 = poly_reg.predict(X)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD8CAYAAABn919SAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAIABJREFUeJzt3Xl4VEW6x/FvJQQIggYlKgSQsIigOKJxuTLuICiLERVlxg11EFd0AIVxwXXgTlxmdBQHQdBxRWGi4gIogldUJBgQEFEQWQIKqMFBA2Sp+8dJQpbu9HZ6/32eJw9J+qS7Tki/p85bVW8Zay0iIhL/UqLdABERcYcCuohIglBAFxFJEAroIiIJQgFdRCRBKKCLiCQIBXQRkQShgC4ikiAU0EVEEkSjSL5Yq1atbIcOHSL5kiIicW/p0qU7rLWZvo6LaEDv0KEDBQUFkXxJEZG4Z4zZ4M9xSrmIiCQIBXQRkQShgC4ikiAU0EVEEoQCuohIgojoLBcRkUSQX1hE3pw1bCkuoU1GOmP6diW3Z1a0m6WALiISiPzCIsbNWkFJaTkARcUljJu1AiDqQV0pFxGRAOTNWVMdzKuUlJaTN2dNlFq0jwK6iEgAthSXBPT9SFJAFxEJQJuM9IC+H0kK6CIiARjTtyvpaam1vpeelsqYvl2j1KJ9NCgqIhKAqoFPzXI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get3WWMSQM+AkZaaz8N9bnjpodeFcwr7QfEx5XIA2vtXGttWeWXnwJto9meUFlrV1tr10S7HSE6AVhrrf3WWrsXeBk4L8ptCpq19kPgp2i3ww3W2q3W2s8rP/8vsBqI29rK1rGr8su0yg9X4lncBHQAY8yDxphNwB+Bu6PdHpdcBbwT7UYIWcCmGl9vJo6DRqIyxnQAegKLo9uS0BhjUo0xy4BtwDxrrSvnE1MB3RjznjFmpYeP8wCstXdYa9sBLwA3Rre1DfN1LpXH3AGU4ZxPTPPnfOKc8fC9uL0LTETGmObATOCWOnfsccdaW26tPQbn7vwEY4wrabGY2rHIWtvbz0NfBN4CxoexOSHxdS7GmCuAAcBZNg4GMgL4v4lXm4F2Nb5uC2yJUlukjspc80zgBWvtrGi3xy3W2mJjzAKgHxDyAHZM9dAbYozpUuPLQcBX0WpLqIwx/YDbgUHW2t+i3R4BnEHQLsaYbGNMY+AS4I0ot0moHkScCqy21j4S7faEyhiTWTWzzRiTDvTGpXgWT7NcZgJdcWZTbABGWGuLotuq4Bhj1gJNgB8rv/VpvM7YATDGnA88DmQCxcAya23f6LYqcMaYc4G/A6nAM9baB6PcpKAZY14CTsep6PcDMN5aOzWqjQqSMeb3wP8BK3De/wB/sda+Hb1WBc8YczTwLM7fWQoww1p7nyvPHS8BXUREGhY3KRcREWmYArqISIJQQBcRSRAK6CIiCUIBXUQkQSigi4gkCAV0EZEEoYAuIpIg/h+uj5IL1ImwHwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.scatter(x, y)\n",
    "plt.plot(np.sort(x), y_predict4[np.argsort(x)], color='r')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 过拟合和欠拟合"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 准备数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [],
   "source": [
    "np.random.seed(666)\n",
    "x = np.random.uniform(-3.0, 3.0, size=100)\n",
    "y = 0.5 * x ** 2 + x + 2. + np.random.normal(0, 1, size=100)\n",
    "X = x.reshape(-1, 1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD8CAYAAABn919SAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAGRxJREFUeJzt3X+MZWV9x/HPd2cH9y4og2HbyECENoZWoHXrjWm6jbGLCirCFlujqY2pTYh/WKlR6lATwbaGbWmNTdM03YiNRooaoVtaaBebxVo3Qr3LYHVZtiVaZAcqY2FaYSdldvfbP2buenfmnHvP73Oec96vhLBz9+yc5/76nud8n+/zPObuAgCEb1PdDQAAFIOADgAtQUAHgJYgoANASxDQAaAlCOgA0BIEdABoCQI6ALQEAR0AWmLzpAPM7NOSrpL0tLtfuvbYSyV9QdKFkv5T0tvd/dlJv+vcc8/1Cy+8MEdzAaB7Dh48+AN33zbpOJs09d/MXivpOUmfHQnofyTpGXffbWZzks5x9w9POlm/3/fBYJDoCQAAVpnZQXfvTzpuYsrF3b8q6Zl1D18j6TNrf/6MpF2pWwgAKFTWHPqPu/tTkrT2/x8rrkkAgCxKHxQ1s+vMbGBmg8XFxbJPBwCdlTWgf9/MXiZJa/9/Ou5Ad9/j7n1372/bNjGnDwDIKGtAv1vSu9f+/G5Jf1tMcwAAWU0M6GZ2h6SvS7rYzI6a2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NymfRczOzdkq6SdLk3fCAjxfsSmqOSLhj5+XxJT9bUFoxYyzffKel2d7+r7vYUwd2XzOwrkq6UVMrAdaN66OOY2StGfrxa0qN1tSUvM7tS0oclXe3ux+puT4d9Q9IrzOwiMztD0jsk3V1zmzpvbSDxNkmH3f0TdbcnDzPbNqxiM7OepNerxNgVUpXLnZIu1mpFxeOS3uvuC/W2Khsze0zSiyT999pDDwRcsfPLkv5M0jZJS5Iedvcr6m1Vcmb2ZkmflDQl6dPu/vGam5SZmd0h6XVaXdnv+5Jucvfbam1UBmb2i5L+RdK3tPp9l6Tfdfd762tVNmb2M5I+o9XP1yZJX3T33yvtfKEEdADAeMGkXAAA4xHQAaAlCOgA0BIEdABoCQI6ALQEAR0AWoKADgAtQUAHgJb4f3CDkLFsqEt5AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.scatter(x, y)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 线性回归拟合数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.4953707811865009"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from sklearn.linear_model import LinearRegression\n",
    "\n",
    "lin_reg = LinearRegression()\n",
    "lin_reg.fit(X, y)\n",
    "lin_reg.score(X, y)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "使用线性回归拟合的结果不好"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [],
   "source": [
    "y_predict = lin_reg.predict(X)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoA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6YpGqnhnwrncDWANgaYLNicXvsYjIFwCcB2Ch5nwgI8TfxTbbAcyt+/poADsyagvVqdabHwBwl6o+mHV7TFDVQRF5AsDZABIZuM5VD92LiBxX9+UFALZk1Za4RORsAIsBXKCq+7NuT4n9BsBxIjJPRA4BcDGAhzJuU+lVBxK/D2Czqt6YdXviEJHZtVlsIlIBcCYSzC6bZrk8AGA+xmdUvATgclXtz7ZV0YjICwAOBfB/1ZuetHjGzl8C+C6A2QAGAWxU1bOybVVwInIOgG8DaAJwm6p+M+MmRSYi9wA4HeM7+70GYKmqfj/TRkUgIh8B8AsAz2L89Q4A16nqw9m1KhoROQnAHRh/fk0BcL+q/kNi57Ml0ImIyJs1JRciIvLGQCciKggGOhFRQTDQiYgKgoFORFQQDHQiooJgoBMRFQQDnYioIP4f2Bf0SgGaMkkAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.scatter(x, y)\n",
    "plt.plot(x, y_predict, color='r')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "计算均方误差"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "3.0750025765636577"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from sklearn.metrics import mean_squared_error\n",
    "\n",
    "mean_squared_error(y, y_predict)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 二次多项式回归拟合数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.pipeline import Pipeline\n",
    "from sklearn.preprocessing import PolynomialFeatures\n",
    "from sklearn.preprocessing import StandardScaler"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [],
   "source": [
    "def PolynomialRegression(degree):\n",
    "    return Pipeline([\n",
    "        (\"poly\", PolynomialFeatures(degree=degree)),\n",
    "        (\"std_scaler\", StandardScaler()),\n",
    "        (\"lin_reg\", LinearRegression())\n",
    "    ])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Pipeline(memory=None,\n",
       "     steps=[('poly', PolynomialFeatures(degree=2, include_bias=True, interaction_only=False)), ('std_scaler', StandardScaler(copy=True, with_mean=True, with_std=True)), ('lin_reg', LinearRegression(copy_X=True, fit_intercept=True, n_jobs=None,\n",
       "         normalize=False))])"
      ]
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "poly2_reg = PolynomialRegression(degree=2)\n",
    "poly2_reg.fit(X, y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1.0987392142417856"
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "y2_predict = poly2_reg.predict(X)\n",
    "mean_squared_error(y, y2_predict)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD8CAYAAABn919SAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAIABJREFUeJzt3Xl8lNW9x/HPDwwQUAkK1hLZ3HBDRKKo4IYbruB63bVuV1u3qlSsrWsVKm7V61r3BSoqRRQQF0QvWq2R4AUElFoQg0hUYkVAIJz7x0kwCbPPM8sz832/XnklmTyZ50wy83vO/M7vnGPOOUREJPxa5LoB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a3mNki4DTguly3JyDnAJNy3YgiVQ4savT9l4Q0cBQqM+sO9AE+yG1LUmdmLc1sBrAUeN05l7HHklcB3czeMLNZET4GAzjnrnXOdQGeBS7ObWtji/dY6o+5FliLfzx5K5HHElIW4bbQvvMrNGa2MfAicHmzd+ih4pyrc87thn8nvqeZZSwdllc7FjnnDk7w0FHABOD6DDYnLfEei5mdBRwFHOTyfCAjif9L2HwJdGn0/VbA4hy1RRqpzze/CDzrnBub6/YEwTlXa2ZTgUFARgau86qHHouZbdfo22OAublqS7rMbBBwNXCMc25FrttTxD4EtjOzHmbWCjgZGJ/jNhW9+oHER4E5zrk7c92edJhZp4YqNjMrBQ4mg7ErTFUuLwI98RUVC4ELnXPVuW1VasxsPtAa+Lb+pvdDXLFzLHAv0AmoBWY45w7LbasSZ2ZHAHcDLYHHnHO35LhJKTOz0cAB+JX9vgaud849mtNGpcDMBgD/C8zEv94Bfu+cm5i7VqXGzHYFnsQ/v1oAY5xzN2XsfGEJ6CIiEltoUi4iIhKbArqISIFQQBcRKRAK6CIiBUIBXUSkQCigi4gUCAV0EZECoYAuIlIg/h+NUeDHtOr9SAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.scatter(x, y)\n",
    "plt.plot(np.sort(x), y2_predict[np.argsort(x)], color='r')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 高次多项式拟合数据的过拟合问题"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "尝试使用10次多项式来拟合训练数据，从训练均方误差来看，好像10次多项式的拟合的效果更好。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1.0508466763764202"
      ]
     },
     "execution_count": 32,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "poly10_reg = PolynomialRegression(degree=10)\n",
    "poly10_reg.fit(X, y)\n",
    "\n",
    "y10_predict = poly10_reg.predict(X)\n",
    "mean_squared_error(y, y10_predict)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD8CAYAAABn919SAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAIABJREFUeJzt3Xl8VdXV//HPSggQQAgKFIkDVBGrYkWRqjhPOCJS6/A4VW1xnqr8Ck6g1oLF+litraWi4mOdQZxFLGIVRQyCAyIKRZEoEoWgQICQ7N8fJ4FA7nzPHc653/frlRckOdy7b7hZd9+1117bnHOIiEjwFeV6ACIi4g8FdBGRkFBAFxEJCQV0EZGQUEAXEQkJBXQRkZBQQBcRCQkFdBGRkFBAFxEJiRbxLjCzB4ATgGXOuT0avrY18ATQHfgCONU5tyLebXXq1Ml17949jeGKiBSeWbNmfeec6xzvOou39d/MDgZWAQ83Ceh/ApY750ab2TCgo3Pu9/HurG/fvq6ioiKhByAiIh4zm+Wc6xvvurgpF+fcf4DlW3z5JGB8w9/HA4OSHqGIiPgq1Rz6T5xz3wA0/NnFvyGJiEgqMr4oamZDzKzCzCqqqqoyfXciIgUr1YD+rZltC9Dw57JoFzrnxjrn+jrn+nbuHDenLyIiKUo1oD8HnNvw93OBZ/0ZjoiIpCpuQDezx4B3gF5mtsTMLgBGA0eZ2efAUQ2fi4hIDsWtQ3fOnRHlW0f4PBYRkVCZNLuSMZPn83V1Dd3KShk6oBeD+pRn7P7iBnQREYktUuAGGD7xI2pq6wCorK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MM85d2eux5MOM+vcWMVmZqXAkWQwdgWpymUC0AuvouJL4CLnXGVuR5UaM1sAtAK+b/jSjABX7JwM3AN0BqqBOc65AbkdVeLM7DjgLqAYeMA5d1uOh5QyM3sMOBSvs9+3wAjn3LicDioFZnYg8CbwEd7vO8B1zrmXcjeq1JjZnsB4vOdXEfCkc+6WjN1fUAK6iIjEFpiUi4iIxKaALiISEgroIiIhoYAuIhISCugiIiGhgC4iEhIK6CIiIaGALiISEv8fmrYz+wsty1EAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.scatter(x, y)\n",
    "plt.plot(np.sort(x), y10_predict[np.argsort(x)], color='r')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "再尝试使用100次多项式来拟合训练数据，从训练均方误差来看，比10次多项式的效果还好。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.6870911922673567"
      ]
     },
     "execution_count": 34,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "poly100_reg = PolynomialRegression(degree=100)\n",
    "poly100_reg.fit(X, y)\n",
    "\n",
    "y100_predict = poly100_reg.predict(X)\n",
    "mean_squared_error(y, y100_predict)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD8CAYAAABn919SAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAIABJREFUeJztnXd4lFXah++TAqQQQgklIQhYAipqgFUERF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y0uF6VUitb6QM3/7wJO1Fr/X5iH5RdKqfOBhVrro0qppwG01uPDPCy/UEr1BKqB14C/aK3zwjwkr1FKxQK/AkOBQuAn4Aqt9S9hHZifKKUGAaXAe1rrk8M9Hn9RSnUCOmmtVyilWgLLgZxo/LsopRSQpLUuVUrFA98Dd2utl4TielFjoVvFvIYkIDp+iZygtZ6ntT5a83QJ0Dmc4wkErfU6rXW0NuE8Hdiotd6sta4ApgGjwjwmv9FafwvsC/c4AkVrvUNrvaLm/weBdUBU1jjWhtKap/E1/0KmXVEj6ABKqSeUUtuAq4C/h3s8QeJG4MtwD6KJkgFsq/O8kCgVjsaKUqorkA0sDe9I/EcpFauU+hnYDXyttQ7Ze4koQVdKzVdKrXHybxSA1vqvWutMYCpwR3hH6x5P76Vmn78CRzHvJ2Lx5r1EKcrJtqid+TU2lFLJwKfAPQ4z9KhCa12ltT4NMxM/XSkVMndYRHUs0loP8XLXD4DPgYdDOJyA8PRelFLXAcOB83SEL2T48HeJNgqBzDrPOwPbwzQWoQ41/uZPgala6xnhHk8w0FoXK6UWAxcAIVm4jigL3R1KqePrPB0JrA/XWAJFKXUBMB4YqbUuC/d4mjA/AccrpboppZoBY4HZYR5Tk6dmIfFNYJ3W+tlwjycQlFJp1ig2pVQCMIQQalc0Rbl8CmRhIip+B/5Pa20J76j8Qym1EWgO7K3ZtCSKI3YuAf4DpAHFwM9a62HhHZX3KKUuAv4NxAJvaa2fCPOQ/EYp9SEwGFPZbxfwsNb6zbAOyg+UUgOB74DVmO87wINa6y/CNyr/UEqdAryLub9igI+01o+F7HrRIuiCIAiCe6LG5SIIgiC4RwRdEAShkSCCLgiC0EgQQRcEQWgkiKALgiA0EkTQBUEQGgki6IIgCI0EEXRBEIRGwv8DC4UgNIUxXxwAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.scatter(x, y)\n",
    "plt.plot(np.sort(x), y100_predict[np.argsort(x)], color='r')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "由于我们取的样本点的横坐标是随机取的，绘制的图没有反映曲线的特征，现在在[-3, 3]范围内等间隔取横坐标，重新绘图"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD8CAYAAABn919SAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAIABJREFUeJztnXl8FOX9x99PDkISjpAQBMKtggpYooAoeOEBImqkVeuv1qNa7eH5qyhVq/WqWnpo9ae2nm09a8WIioqKJyACRkG5lSsJkKCEM4SEPL8/nkyyu9ljZnY2e+T7fr14LZnM7Dy72f3Md76n0lojCIIgJD9p8V6AIAiC4A0i6IIgCCmCCLogCEKKIIIuCIKQIoigC4IgpAgi6IIgCClCREFXSj2plKpSSn3lsy1fKfWOUmp102O32C5TEARBiIQdC/1pYGLAtmnAe1rrg4H3mn4WBEEQ4oiyU1iklBoAvK61Htb080rgBK31JqVUL+ADrfWQWC5UEARBCE+Gy+MO0FpvAmgS9R6hdlRKXQ5cDpCbm3vkIYcc4r/DihWQlgaDB7tciiAIQgJSXw9Llpj/d+0KublQWQlHHAG7d8PKlUb3OneO+FSLFy/eqrUujLSfWwu9Rmud5/P7bVrriH70kSNH6kWLFvlvPOYY80LfeSfiOgRBEJKGzZuhVy/z/3Hj4NRT4dZboaEB5s2D446Dd9+Fk06K+FRKqcVa65GR9nOb5bKlydVC02OVy+cx1rn0kxEEIdXw1bXvvmv5WamYndKtoM8ELmr6/0XAq65XoBQ0Nro+XBAEISEJFHRL5+Ip6Eqp54H5wBClVLlS6lLgX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SYB9wPpwJNa67vjvCTPUEo9D5yAaS+7BbhNa/1EXBflEUqpccDHwFKMngDcpLWeFb9VeYdS6nDgn5jPZRrwH631HWGPSUKvgCAIghAEqRQVBEFIEUTQBUEQUgQRdEEQhBRBBF0QBCFFEEEXBEFIEUTQBUEQUgQRdEEQhBTh/wG4sZ3xnoNshwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "X_plot = np.linspace(-3, 3, 100).reshape(100, 1)\n",
    "y_plot = poly100_reg.predict(X_plot)\n",
    "\n",
    "plt.scatter(x, y)\n",
    "plt.plot(X_plot[:, 0], y_plot, color='r')\n",
    "plt.axis([-3, 3, -1, 10])\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "* 到此，这张图才是100百次多项式真正拟合出的曲线，显然有更多的样本点落到了曲线上，可以看出，一定能够找到一个非常复杂的曲线，让所有的样本点全部都落在这条曲线上。\n",
    "* 虽然从均方误差的角度看，随着多项式最高次数的增加，均方误差在减小，但是这个拟合出的曲线完全不是我们想要的样子。<font color=red>为了拟合所有的样本点，太过复杂了，这种对训练数据拟合得好，对测试数据拟合得不好的情况称之为过拟合（Overfitting）；相应地，如果多项式次数太小，曲线明显跟样本拟合程度太差，这种情况称为欠拟合（Underfitting）。</font>"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 将数据集分为训练数据集合测试数据集（train_test_split）的意义"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.model_selection import train_test_split\n",
    "X_train, X_test, y_train, y_test = train_test_split(X, y, random_state=666)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "为了解决过拟合的问题，需要使用训练数据集训练模型，使用测试数据集测试训练出的模型的泛化能力。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "LinearRegression(copy_X=True, fit_intercept=True, n_jobs=None,\n",
       "         normalize=False)"
      ]
     },
     "execution_count": 40,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "lin_reg = LinearRegression()\n",
    "lin_reg.fit(X_train, y_train)\n",
    "y_predict = lin_reg.predict(X_test)\n",
    "mean_squared_error(y_test, y_predict)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.8035641056297901"
      ]
     },
     "execution_count": 42,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "poly2_reg = PolynomialRegression(degree=2)\n",
    "poly2_reg.fit(X_train, y_train)\n",
    "y2_predict = poly2_reg.predict(X_test)\n",
    "mean_squared_error(y_test, y2_predict)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.9212930722150697"
      ]
     },
     "execution_count": 43,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "poly10_reg = PolynomialRegression(degree=10)\n",
    "poly10_reg.fit(X_train, y_train)\n",
    "y10_predict = poly10_reg.predict(X_test)\n",
    "mean_squared_error(y_test, y10_predict)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "14075780347.739939"
      ]
     },
     "execution_count": 44,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "poly100_reg = PolynomialRegression(degree=100)\n",
    "poly100_reg.fit(X_train, y_train)\n",
    "y100_predict = poly100_reg.predict(X_test)\n",
    "mean_squared_error(y_test, y100_predict)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "通过增大多项式的次数，然后使用测试数据集测试模型计算均方误差，可以看出，只有既能很好地拟合训练数据，又能很好地拟合测试数据集才是真正的好模型。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 学习曲线"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 准备数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "# 解决绘图中文乱码问题\n",
    "plt.rcParams['font.sans-serif']=['SimHei'] #用来正常显示中文标签\n",
    "plt.rcParams['axes.unicode_minus']=False #用来正常显示负号"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {},
   "outputs": [],
   "source": [
    "np.random.seed(666)\n",
    "x = np.random.uniform(-3.0, 3.0, size=100)\n",
    "y = 0.5 * x ** 2 + x + 2 + np.random.normal(0, 1, size=100)\n",
    "\n",
    "X = x.reshape(-1, 1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXEAAAD6CAYAAABXh3cLAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAF7lJREFUeJzt3X+IZXd5x/HPs5MbnSR2Z0OmKRkaE0EiTbfpmos1rMq6EGMRddm1WhCFYlkLxUIroSNaTdWSxa3+I0S6JYLQUExNHLRpurHd2NjFtMwwFbHN0oKJ5Ybg2GSS6k5xHJ/+MXNn7945597z+5zvOe8XiJPZO3O/d+49z/me5/s832PuLgBAmPbVPQAAQHYEcQAIGEEcAAJGEAeAgBHEASBgBHEACBhBHAACRhAHgIARxAEgYFeU/QTXXXed33TTTWU/DQC0ysrKyo/cfX7a4xIFcTO7XtJX3P2NZtaT9LCkayXd7+5fn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zTtJ6nePJY2eB5m8kfcTds+4jg+L8WNLwrsjXqMHHQZe05TipOnY1+cN7RtL7zOwJSTPavuwN1Qe0Pdv7qJl908zeU/eAOm5F2ykUSbpN0tP1DQUj2nKcVBq7aPZB55jZL0j6lqR/lPSbkl7v7i/WOyogG4I4OmmnNO9OSU+4+3N1jwfIiiAOAAFrck4cADAFQRwAAkYQB4CAEcQBIGAEcQAI2P8DRTYZpMfeUn0AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.scatter(x, y)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 绘制学习曲线"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "学习曲线：随着样本数据的逐渐增多，算法训练出的模型的表现能力。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.model_selection import train_test_split"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {},
   "outputs": [],
   "source": [
    "X_train, X_test, y_train, y_test = train_test_split(X, y, random_state=10)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(75, 1)"
      ]
     },
     "execution_count": 39,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X_train.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(25, 1)"
      ]
     },
     "execution_count": 40,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X_test.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {},
   "outputs": [],
   "source": [
    "def plot_learning_curve(algo, X_train, y_train, X_test, y_test):\n",
    "    train_score = [] # 记录模型在训练数据集上的预测的均方误差\n",
    "    test_score = []  # 记录模型在测试数据集上的预测的均方误差\n",
    "    for i in range(1, 76):\n",
    "        # 每次取前i个样本进行训练\n",
    "        algo.fit(X_train[:i], y_train[:i])\n",
    "\n",
    "        y_train_predict = algo.predict(X_train[:i])\n",
    "        train_score.append(mean_squared_error(y_train[:i], y_train_predict))\n",
    "\n",
    "        y_test_predict = algo.predict(X_test)\n",
    "        test_score.append(mean_squared_error(y_test, y_test_predict))\n",
    "    plt.plot([i for i in range(1, len(train_score) + 1)], np.sqrt(train_score), label=\"train\", color=\"r\")\n",
    "    plt.plot([i for i in range(1, len(test_score) + 1)], np.sqrt(test_score), label=\"test\", color=\"b\")\n",
    "    plt.xlabel(\"样本数据个数\")\n",
    "    plt.ylabel(\"均方根误差\")\n",
    "    plt.legend()\n",
    "    plt.axis([0, len(X_train) + 1, 0, 4])\n",
    "    plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 绘制线性回归模型的学习曲线"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.linear_model import LinearRegression\n",
    "from sklearn.metrics import mean_squared_error"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEHCAYAAACumTGlAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAIABJREFUeJzt3Xt8VOW1//HPSkgCAiIgCnIRBFQsitVUQRTxWvVobSlequJpacWeY21tbY96SlvtsdX6s9Z6L0dEayutWvWoFUFRlHoBQRHxCgooiApyvyRAsn5/rBkTYCY3MplJ5vt+vfZrJjPP7L0yhL32c9nPY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GjPrDJwJJJPAf5jZpGpTTrQiTuCjiBP9FuKGvkOJk/QX4/PN7GjiTtRHiGagp4nmHszsQqJGMhV4Fbgg0fRTBlS4+0rgNDM7FVhcn+OKNBYlBGlxzOxEYp6YxcC/iJt+/mZmdwNXuvsiCyXEHDi/AA4Ayojpqh82szPcfQXRbn810fcwiGgS6gM8lDjcpMQxzwdGAtPd/c5En8AoMxsJ4O7V+xBuSRe7uz+e2N/QuhxXpDEpIUhL1JVodhlPtM2/YGYbgf2Bfma2mbiKP5OYZOw3QCegElhDTDXyipmNcPcXzOx+YnroScCb7r7FzF4l+g5+nTjmA8C9wGNm1gtYYWbvE7PIYmZ/dPfudf0F6nFckUajhCAtjrv/GWJmycTcUYMTP99NVQ2hN9GX8EDivYuAMncfn/h5IjA/scs7iHUNxgKLzawP8CWgHDiEmJtmU+JzTsxm+QzQzd3PTrz+tzThGumHf9d63Hp9MSK1UEKQlqx1itcKAdx9EdvOLllIrBJG4v134Yu5Zm4n2uwHE01LE4CfAp8CD5rZOe7+vpn9jljoZBjwfeCPiYntIDqGUykiRiFtoz7HrekLEKkPjTISqUXynoTEcwOSNQ/MzDzNfyIzK3L3LU19XJGGUkIQERFAU1eIiEiCEoKIiABKCCIikqCEICIigBKCiIgk/H9QV1IF0RnFkQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plot_learning_curve(LinearRegression(), X_train, y_train, X_test, y_test)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 绘制多项式回归的学习曲线"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.preprocessing import PolynomialFeatures\n",
    "from sklearn.preprocessing import StandardScaler\n",
    "from sklearn.pipeline import Pipeline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {},
   "outputs": [],
   "source": [
    "def PolynomialRegression(degree):\n",
    "    return Pipeline([\n",
    "        (\"poly\", PolynomialFeatures(degree=degree)),\n",
    "        (\"std_scaler\", StandardScaler()),\n",
    "        (\"lin_reg\", LinearRegression())\n",
    "    ])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "绘制2次多项式回归的学习曲线"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEHCAYAAACumTGlAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAIABJREFUeJzt3XmcVPWZ7/HP002z79CCsrgA6hgUFyAQNzRgNDGTDKOJk0Rvxhgcx3ivYyZXndEbzTXjJHcmMYvRkKgzMaMZ91Gjgqgok6jQJIgkEXEB7QYElB0amua5fzynrKK7qjf6dFdT3/frdV61/erUr6u7z3N+y3l+5u6IiIiUdXYFRESkOCggiIgIoIAgIiIJBQQREQEUEEREJKGAICIigAKCiIgkUg0IZjbMzH7fxOt3mNmLZnZdmvUQEZHmpd1C+BegV74XzGwmUO7uU4EjzGxcynUREZEmdEtrx2Z2JrAdWFugyDTgvuT+XOAUYEWe/cwCZgH06dPnpKOPPrrRjtasgdWr4YQToKyJEFddDevXRzkRkVKxePHiDe5e2Vy5VAKCmXUHrgf+AnikQLE+QE1y/wPgxHyF3H02MBtg4sSJXlVV1ajM5ZfDr34Fv/td0/X6+tfhpz+FPLsQETlgmdmqlpRLq8voGuAn7r6piTLbyHYn9d2fuqxeDYcc0nw5s7Z+gojIgS+tgDAduNzM5gPHm9nP85RZTHQTAUwAVrb1w2pqWhYQAJTLT0Qkv1S6jNz9tMz9JCh8z8xucvfc2USPAA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gRXJLm8n1jW4DlhlZocDHwF2AScSuWl2Ju9zIpvls8DB7n5B8vyvClTXKDz9u9nPbdUXI9IMBQQ5kPXM81w5gLuvZN/skuXEKmEkry+HD3PN3Eb02U8hupbuAv4eeA94wMy+4O5vmtl3iIVOTgP+BvhBktgOYmA4nwpiFtI+WvO5TX0BIq2hWUYizchck5DcNyDT8sDMzAv8E5lZhbvXdfTnirSVAoKIiABKXSEiIgkFBBERARQQREQkoYAgIiKAAoKIiCT+PyKtbt4t6eTBAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "poly2_reg = PolynomialRegression(degree=2)\n",
    "plot_learning_curve(poly2_reg, X_train, y_train, X_test, y_test)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "绘制20次多项式回归的学习曲线"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEHCAYAAACumTGlAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAIABJREFUeJzt3Xl8VPXZ9/HPBQn7GoyAC4iKS4tiNfWGihgtULVqEW211VprKz4W6W3t0yIttrhQ7GZd6lIecMPtxo0KrUJREbRSJVYBb7Vq6wKyyb4TyPX88TtDYsgySebMTGa+79frvOZk5jdnrkQ815zfch1zd0RERFpkOgAREckOSggiIgIoIYiISEQJQUREACUEERGJKCGIiAighCAiIpFYE4KZdTezf9bx+hQze9nMxsUZh4iI1C/uK4TfAW1resHMRgAt3X0gcLCZ9Y05FhERqUNBXAc2s1OALcCKWpqUAtOi/dnAIODdGo4zEhgJ0L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OMROqRWJMQ7RuQuPLAzMxr+Z/IzArdvTzdnyvSWEoIIiICqHSFiIhElBBERARQQhARkYgSgoiIAEoIIiIS+f+uxc/e62ueRwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "poly20_reg = PolynomialRegression(degree=20)\n",
    "plot_learning_curve(poly20_reg, X_train, y_train, X_test, y_test)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {
    "height": "calc(100% - 180px)",
    "left": "10px",
    "top": "150px",
    "width": "173.448px"
   },
   "toc_section_display": true,
   "toc_window_display": true
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
